package com.example.translateappjava.Utils;

/**
 * Represents a data item containing an image resource ID and associated text content.
 * Used for storing and managing paired image-text data in the application.
 */
public class DataItem {
    // Resource ID of the associated image
    private int imageId;
    // Text content associated with the image
    private String context;

    /**
     * Constructs a new DataItem with specified image and text content.
     * @param imageId The resource ID of the image
     * @param context The text content to associate with the image
     */
    public DataItem(int imageId, String context) {
        this.imageId = imageId;
        this.context = context;
    }

    /**
     * @return The resource ID of the associated image
     */
    public int getImageId() {
        return imageId;
    }

    /**
     * @return The text content associated with the image
     */
    public String getContext() {
        return context;
    }

    /**
     * Sets a new image resource ID for this data item.
     * @param imageId The new resource ID to set
     */
    public void setImageId(int imageId) {
        this.imageId = imageId;
    }

    /**
     * Sets new text content for this data item.
     * @param context The new text content to set
     */
    public void setContext(String context) {
        this.context = context;
    }
}